package com.movie.service.Impl;

import com.movie.beans.SiteRate;
import com.movie.dao.SiteRateDAO;
import com.movie.service.SiteRateService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SiteRateServiceImpl implements SiteRateService {
    @Resource
    private SiteRateDAO siteRateDAO;

    @Override
    public int insert(SiteRate siteRate) {
        return siteRateDAO.insert(siteRate);
    }

    @Override
    public SiteRate selectSiteRateByMovieId(Long movieId) {
        return siteRateDAO.selectSiteRateByMovieId(movieId);
    }

    @Override
    public List<SiteRate> getDefaultMovies() {
        return siteRateDAO.getDefaultMovies();
    }

    @Override
    public int update(SiteRate siteRate) {
        return siteRateDAO.update(siteRate);
    }
}
